Check field range with doc values skipper for date field#20287
Check field range with doc values skipper for date field#20287bugmakerrrrrr wants to merge 1 commit intoopensearch-project:mainfrom
Conversation
WalkthroughIntroduces Changes
Sequence DiagramsequenceDiagram
participant Query as Query Executor
participant ISWQ as isFieldWithinQuery
participant PR as PointValues Reader
participant DVS as DocValuesSkipper
participant Leaf as LeafReaderContext
Query->>ISWQ: isFieldWithinQuery(IndexReader, bounds)
alt Field is Searchable
ISWQ->>PR: extract min/max from PointValues
PR-->>ISWQ: minValue, maxValue
ISWQ->>ISWQ: compare with query range
else Has DocValues with Skiplist
ISWQ->>Leaf: iterate leaf contexts
loop For Each Leaf
Leaf->>DVS: get skipper stats
DVS-->>Leaf: min, max per leaf
Leaf->>ISWQ: aggregate global bounds
end
ISWQ->>ISWQ: check global min vs max
alt Global min > max
ISWQ-->>Query: DISJOINT
else
ISWQ->>ISWQ: compare with query range
end
else No Skiplist Data
ISWQ-->>Query: INTERSECTS (conservative)
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (8)
🧰 Additional context used🧬 Code graph analysis (1)server/src/test/java/org/opensearch/index/mapper/DateFieldTypeTests.java (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
🔇 Additional comments (19)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
❌ Gradle check result for bda04be: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
|
This PR is stalled because it has been open for 30 days with no activity. |
Description
This commit takes advantage of doc values skipper to check the range of date field when rewriting query on the shard level
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.
Summary by CodeRabbit
New Features
Tests
✏️ Tip: You can customize this high-level summary in your review settings.